package thingtest.game;

import java.util.Iterator;
import java.util.LinkedList;

public class ListOfThings {

	private LinkedList<Thing> list;

	public ListOfThings(){
		this.list = new LinkedList<Thing>();
	}

	public void add(Thing thing) {
		this.list.add(thing);
		
	}

	public boolean contains(Thing thing) {
		return this.list.contains(thing);
		
	}

	public void makeAllAdvance() {

		Iterator<Thing> iterator = this.list.iterator();
		
		while(iterator.hasNext()){
			iterator.next().advance();
		}
		
	}

	public Iterator<Thing> iterator() {
		return list.iterator();
	}

	public int size() {
		return list.size();
	}
	
}
